import Login from '../config/views/Login.vue'
import Register from "../config/views/Register";
import NotFound from '../config/views/404.vue'
import Home from '../config/views/Home.vue'
import Main from '../config/views/Main.vue'

/* 后台展示 */
import echarts from '../config/views/charts/echarts.vue'
// 组织机构管理
import Department from "../config/views/org/Department";
import Employee from "../config/views/org/Employee";
import Shop from "../config/views/org/Shop";
// 数据字典
import SystemDictionaryDetail from "../config/views/sys/SystemDictionaryDetail";
import SystemDictionaryType from "../config/views/sys/SystemDictionaryType";
// 寻主消息管理
import SearchMasterMsgPending from "../config/views/pet/SearchMasterMsgPending";
import SearchMasterMsgProcessed from "../config/views/pet/SearchMasterMsgProcessed";
import Pet from "../config/views/pet/Pet";
// 用户管理
import User from "../config/views/user/User";
import WxUser from "../config/views/user/WxUser";
//宠物服务
import Product from "../config/views/product/Product";
// 订单管理
import AdoptOrder from "../config/views/order/AdoptOrder";

let routes = [
    {
        path: '/login',
        component: Login,
        name: '',
        hidden: true
    },
    {
        path: '/shopRegister',
        component: Register,
        name: '',
        hidden: true
    },
    {
        path: '/404',
        component: NotFound,
        name: '',
        hidden: true
    },
    //{ path: '/main', component: Main },
    {
        path: '/', // 主页面
        component: Home,
        name: 'Charts', // 名称
        iconCls: 'el-icon-house',
        leaf: true,//只有一个节点
        children: [
            { path: '/', component: echarts, name: 'echarts' } //分别是请求路径 和 组件 以及标签名称
        ]
    }
    ,
    {
        path: '/',
        component: Home,
        name: '组织机构管理',
        iconCls: 'el-icon-notebook-2',//图标样式class
        children: [
            { path: '/department', component: Department, name: '部门管理' },
            { path: '/employee', component: Employee, name: '员工管理' },
            { path: '/shop', component: Shop, name: '店铺管理' },
        ]
    }
    ,
    {
        path: '/',
        component: Home,
        name: '数据字典管理',
        iconCls: 'el-icon-notebook-2',//图标样式class
        children: [
            { path: '/dictionaryType', component: SystemDictionaryType, name: '数据字典类型' },
            { path: '/dictionaryDetail', component: SystemDictionaryDetail, name: '数据字典明细' },
        ]
    }
    ,
    {
        path: '/',
        component: Home,
        name: '宠物模块',
        iconCls: 'el-icon-user',//图标样式class
        children: [
            { path: '/msgPending', component: SearchMasterMsgPending, name: '待处理消息' },
            { path: '/msgProcessed', component: SearchMasterMsgProcessed, name: '已处理消息' },
            { path: '/pet', component: Pet, name: '宠物管理' },
        ]
    } ,
    {
        path: '/',
        component: Home,
        name: '用户模块',
        iconCls: 'el-icon-user',//图标样式class
        children: [
            { path: '/user', component: User, name: '用户管理' },
            { path: '/wxuser', component: WxUser, name: '微信用户管理' },
        ]
    } ,
    {
        path: '/',
        component: Home,
        name: '服务模块',
        iconCls: 'el-icon-user',//图标样式class
        children: [
            { path: '/product', component: Product, name: '宠物服务管理' },
        ]
    },
    {
        path: '/',
        component: Home,
        name: '订单模块',
        iconCls: 'el-icon-user',//图标样式class
        children: [
            { path: '/adoptOrder', component: AdoptOrder, name: '领养订单管理' },
        ]
    }
];

export default routes;